#pragma once
#include"_rbtree.hpp"
template<class K>
class _set
{
	struct SetKeyofT
	{
		const K& operator()(const K& k) {
			return k;
		}
	};

public:
	
	typedef typename RBT<K, const K, SetKeyofT>::Iterator iterator;
	typedef typename RBT<K, const K, SetKeyofT>::ConstIterator const_iterator;


public:

	iterator begin() {
		return _t.Begin();
	}

	iterator end() {
		return _t.End();
	}

	const_iterator begin() const{
		return _t.Begin();
	}

	const_iterator end() const{
		return _t.End();
	}
public:
	void printset() {
		_t.InOrder();
	}

	pair<iterator,bool> insert(const K& key) {
		return _t.Insert(key);
	}

	iterator find(const K& key) {
		return _t.Find(key);
	}

	long long count() {
		return _t.Size();
	}

	long long max() {
		return _t.Max();
	}

	long long min() {
		return _t.Min();
	}

	_set() {};
	~_set() {};

private:
	RBT<K, const K, SetKeyofT> _t;
};
